package com.tengju.bff.interfaces.covercharge.constant;

/**
 * 乐税提现申请状态枚举类
 *
 * @author zhaoyi
 */
public enum LetaxWithdrawStatusEnum {

    APPLY(1, "申请中"),
    PUT(2, "已发放"),
    REJECT(3, "审核拒绝"),
    PASS(4, "审核通过"),
    PUTFAIL(5, "发放失败"),
    CANCEL(6, "已取消"),
    PUTFAIL_MODIFY(7, "发放失败-账户已修改");

    private Integer code;
    private String desc;

    LetaxWithdrawStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }

    public static LetaxWithdrawStatusEnum getStatusDesc (Integer code){
        for(LetaxWithdrawStatusEnum orderStatusEnum : (LetaxWithdrawStatusEnum.values())){
            if(orderStatusEnum.getCode().equals(code)){//如果传入的code与此枚举code相同，则返回此枚举
                return orderStatusEnum;
            }
        }
        return null;
    }

}
